import Layout from "@/layout";

export const oaRouter = [
    {
        path: '/oa/customForm/formDesigner',
        component: Layout,
        hidden: true,
        permissions: ['oa:customForm:formDesigner'],
        children: [
            {
                path: ':formId(\\d+)',
                component: () => import('@/views/oa/customForm/formDesigner'),
                name: 'FormDesigner',
                meta: {title: '表单设计器', activeMenu: '/oa/customForm'}
            }
        ]
    },
    // 报销申请表单
    {
        path: '/oa/reimburse/reimburseApply/form',
        component: Layout,
        hidden: true,
        permissions: ['oa:reimburseApply:add'],
        children: [
            {
                path: 'add/:billType',
                component: () => import('@/views/oa/reimburseApply/form'),
                name: 'ReimburseApplyForm',
                meta: {title: '报销申请单', activeMenu: '/oa/reimburse/reimburseApply'}
            },
            {
                path: ':formId(\\d+)',
                component: () => import('@/views/oa/reimburseApply/form'),
                name: 'ReimburseApplyForm',
                meta: {title: '报销申请单', activeMenu: '/oa/reimburse/reimburseApply'}
            }
        ]
    },
    // 假勤申请表单
    {
        path: '/oa/duty/dutyApply/form',
        component: Layout,
        hidden: true,
        permissions: ['oa:dutyApply:add'],
        children: [
            {
                path: 'add/:billType',
                component: () => import('@/views/oa/dutyApply/form'),
                name: 'DutyApplyForm',
                meta: {title: '假勤申请单', activeMenu: '/oa/duty/dutyApply'}
            },
            {
                path: ':formId(\\d+)',
                component: () => import('@/views/oa/dutyApply/form'),
                name: 'DutyApplyForm',
                meta: {title: '假勤申请单', activeMenu: '/oa/duty/dutyApply'}
            }
        ]
    },
    // 车辆申请
    {
        path: '/oa/car/carApply/form',
        component: Layout,
        hidden: true,
        permissions: ['oa:carApply:add'],
        children: [
            {
                path: 'add/:billType',
                component: () => import('@/views/oa/carApply/form'),
                name: 'CarApplyForm',
                meta: {title: '车辆申请单', activeMenu: '/oa/commonApply/carApply'}
            },
            {
                path: ':formId(\\d+)',
                component: () => import('@/views/oa/carApply/form'),
                name: 'CarApplyForm',
                meta: {title: '车辆申请单', activeMenu: '/oa/commonApply/carApply'}
            }
        ]
    },
    {
        path: '/oa/commonApply/hotelApply/form',
        component: Layout,
        hidden: true,
        permissions: ['oa:hotelApply:add'],
        children: [
            {
                path: 'add/:billType',
                component: () => import('@/views/oa/hotelApply/form'),
                name: 'HotelApplyForm',
                meta: {title: '酒店申请单', activeMenu: '/oa/commonApply/hotelApply'}
            },
            {
                path: ':formId(\\d+)',
                component: () => import('@/views/oa/hotelApply/form'),
                name: 'HotelApplyForm',
                meta: {title: '酒店申请单', activeMenu: '/oa/commonApply/hotelApply'}
            }
        ]
    },
    {
        path: '/oa/commonApply/meetingroomApply/form',
        component: Layout,
        hidden: true,
        permissions: ['oa:meetingroomApply:add'],
        children: [
            {
                path: 'add/:billType',
                component: () => import('@/views/oa/meetingroomApply/form'),
                name: 'MeetingroomApplyForm',
                meta: {title: '会议室使用申请', activeMenu: '/oa/commonApply/meetingroomApply'}
            },
            {
                path: ':formId(\\d+)',
                component: () => import('@/views/oa/meetingroomApply/form'),
                name: 'MeetingroomApplyForm',
                meta: {title: '会议室使用申请', activeMenu: '/oa/commonApply/meetingroomApply'}
            }
        ]
    },
    {
        path: '/oa/commonApply/sealApply/form',
        component: Layout,
        hidden: true,
        permissions: ['oa:sealApply:add'],
        children: [
            {
                path: 'add/:billType',
                component: () => import('@/views/oa/sealApply/form'),
                name: 'SealApplyForm',
                meta: {title: '公章使用申请', activeMenu: '/oa/commonApply/sealApply'}
            },
            {
                path: ':formId(\\d+)',
                component: () => import('@/views/oa/sealApply/form'),
                name: 'SealApplyForm',
                meta: {title: '公章使用申请', activeMenu: '/oa/commonApply/sealApply'}
            }
        ]
    },
    {
        path: '/oa/commonApply/ticketApply/form',
        component: Layout,
        hidden: true,
        permissions: ['oa:ticketApply:add'],
        children: [
            {
                path: 'add/:billType',
                component: () => import('@/views/oa/ticketApply/form'),
                name: 'TicketApplyForm',
                meta: {title: '车船票申请', activeMenu: '/oa/commonApply/ticketApply'}
            },
            {
                path: ':formId(\\d+)',
                component: () => import('@/views/oa/ticketApply/form'),
                name: 'TicketApplyForm',
                meta: {title: '车船票申请', activeMenu: '/oa/commonApply/ticketApply'}
            }
        ]
    },

    {
        path: '/oa/myApply/createApply',
        component: Layout,
        hidden: true,
        permissions: ['oa:myApply:add'],
        children: [
            {
                path: ':formidOrApplyid(\\d+)',
                component: () => import('@/views/oa/myApply/createApply'),
                name: 'CreateApply',
                meta: {title: '表单信息', activeMenu: '/oa/myApply'}
            }
        ]
    },
    {
        path: '/oa/myApply/customFormTask',
        component: Layout,
        hidden: true,
        permissions: ['oa:myTask:list'],
        children: [
            {
                path: ':formId(\\d+)',
                component: () => import('@/views/oa/myApply/customFormTask'),
                name: 'CustomFormTask',
                meta: {title: '自定义表单', activeMenu: '/oa/myTask'}
            }
        ]
    },


    {
        path: '/oa/officeGoods/officeGoodsApply/form',
        component: Layout,
        hidden: true,
        permissions: ['oa:officeGoodsApply:add'],
        children: [
            {
                path: 'add/:billType',
                component: () => import('@/views/oa/officeGoodsApply/form'),
                name: 'OfficeGoodsApplyForm',
                meta: {title: '办公用品领用', activeMenu: '/oa/officeGoods/officeGoodsApply'}
            },
            {
                path: ':formId(\\d+)',
                component: () => import('@/views/oa/officeGoodsApply/form'),
                name: 'OfficeGoodsApplyForm',
                meta: {title: '办公用品领用', activeMenu: '/oa/officeGoods/officeGoodsApply'}
            }
        ]
    },



    {
        path: '/oa/workPlan/workPlan/form',
        component: Layout,
        hidden: true,
        permissions: ['oa:officeGoodsApply:add'],
        children: [
            {
                path: 'add/:billType',
                component: () => import('@/views/oa/workPlan/form'),
                name: 'WorkPlanForm',
                meta: {title: '工作计划', activeMenu: '/oa/workPlan/workPlan'}
            },
            {
                path: ':formId(\\d+)',
                component: () => import('@/views/oa/workPlan/form'),
                name: 'WorkPlanForm',
                meta: {title: '工作计划', activeMenu: '/oa/workPlan/workPlan'}
            },
            {
                path: 'track/:formId(\\d+)',
                component: () => import('@/views/oa/workPlan/track'),
                name: 'WorkPlanTrack',
                meta: {title: '计划跟踪', activeMenu: '/oa/workPlan/track'}
            },
        ]
    },


    {
        path: '/oa/sendTask/sendTask/form',
        component: Layout,
        hidden: true,
        permissions: ['oa:sendTask:add'],
        children: [
            {
                path: 'add/:billType',
                component: () => import('@/views/oa/sendTask/form'),
                name: 'SendTaskForm',
                meta: {title: '任务分配', activeMenu: '/oa/sendTask/sendTask'}
            },
            {
                path: ':formId(\\d+)',
                component: () => import('@/views/oa/sendTask/form'),
                name: 'SendTaskForm',
                meta: {title: '任务分配', activeMenu: '/oa/sendTask/sendTask'}
            }
        ]
    },


    {
        path: '/oa/officalDoc/officalDoc/form',
        component: Layout,
        hidden: true,
        permissions: ['oa:officalDoc:add'],
        children: [
            {
                path: 'add/:billType',
                component: () => import('@/views/oa/officalDoc/form'),
                name: 'OfficalDocForm',
                meta: {title: '公文起草', activeMenu: '/oa/officeDoc/officalDoc'}
            },
            {
                path: ':formId(\\d+)',
                component: () => import('@/views/oa/officalDoc/form'),
                name: 'OfficalDocForm',
                meta: {title: '公文起草', activeMenu: '/oa/officeDoc/officalDoc'}
            }
        ]
    },



    {
        path: '/oa/officalDoc/outsideReceive/form',
        component: Layout,
        hidden: true,
        permissions: ['oa:officalDoc:add'],
        children: [
            {
                path: 'add/:billType',
                component: () => import('@/views/oa/officalDoc/receive/outside/form'),
                name: 'OutsideReceiveForm',
                meta: {title: '外部收文', activeMenu: '/oa/officeDoc/outside'}
            },
            {
                path: ':formId(\\d+)',
                component: () => import('@/views/oa/officalDoc/receive/outside/form'),
                name: 'OutsideReceiveForm',
                meta: {title: '外部收文', activeMenu: '/oa/officeDoc/outside'}
            }
        ]
    },


    {
        path: '/oa/work/workRequest/form',
        component: Layout,
        hidden: true,
        permissions: ['oa:officalDoc:add'],
        children: [
            {
                path: 'add/:billType',
                component: () => import('@/views/oa/workRequest/form'),
                name: 'OutsideReceiveForm',
                meta: {title: '工作请示', activeMenu: '/oa/commonApply/workRequest'}
            },
            {
                path: ':formId(\\d+)',
                component: () => import('@/views/oa/workRequest/form'),
                name: 'OutsideReceiveForm',
                meta: {title: '工作请示', activeMenu: '/oa/commonApply/workRequest'}
            }
        ]
    },

]
